package com.adcc.loadsheet.billing.entity;

import com.adcc.loadsheet.billing.vo.SystemJobLogEntityVO;
import org.joda.time.DateTime;

import java.util.Date;

/**
 * JOB日志实体
 */
public class SystemJobLogEntity extends BasisEntity<SystemJobLogEntityVO> {

    //日志类型
    private Integer logType;

    //日志内容
    private String content;

    //生成时间
    private Date createAt;

    @Override
    public SystemJobLogEntityVO toVO() {
        SystemJobLogEntityVO vo = new SystemJobLogEntityVO();
        vo.setLogType(this.logType);
        vo.setContent(this.content);
        if (this.createAt != null) {
            vo.setCreateAt(new DateTime(this.createAt).toString("yyyy-MM-dd HH:mm:ss"));
        } else {
            vo.setCreateAt("");
        }
        return vo;
    }

    public Integer getLogType() {
        return logType;
    }

    public void setLogType(Integer logType) {
        this.logType = logType;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Date createAt) {
        this.createAt = createAt;
    }
}
